﻿using System;
using System.Collections.Generic;
using System.Text;

using H2.NET.Data.Common;
using H2.NET.Data.Common.Mappings;
using H2.NET.Data.Common.Validates;

namespace H2.NET.Business
{
    [Table]
    [Serializable]
    public partial class t_Assessment : DataObject
    {
        [ID]
        [DID]
        public string ID { get { return _ID; } set { _ID = value; EntityState.FieldChange("ID"); } }
        private string _ID;
        public static FieldInfo id = new FieldInfo("t_Assessment", "ID");

        //流程名
        [Column]
        public string Process { get { return _Process; } set { _Process = value; EntityState.FieldChange("Process"); } }
        private string _Process;
        public static FieldInfo process = new FieldInfo("t_Assessment", "Process");

        //实例号
        [Column]
        public int Incident { get { return _Incident; } set { _Incident = value; EntityState.FieldChange("Incident"); } }
        private int _Incident;
        public static FieldInfo incident = new FieldInfo("t_Assessment", "Incident");

        //步骤名
        [Column]
        public string Step { get { return _Step; } set { _Step = value; EntityState.FieldChange("Step"); } }
        private string _Step;
        public static FieldInfo step = new FieldInfo("t_Assessment", "Step");

        //用户名
        [Column]
        public string UserName { get { return _UserName; } set { _UserName = value; EntityState.FieldChange("UserName"); } }
        private string _UserName;
        public static FieldInfo userName = new FieldInfo("t_Assessment", "UserName");

        //用户全名
        [Column]
        public string UserFullName { get { return _UserFullName; } set { _UserFullName = value; EntityState.FieldChange("UserFullName"); } }
        private string _UserFullName;
        public static FieldInfo userfullname = new FieldInfo("t_Assessment", "UserFullName");

        //用户名
        [Column]
        public string AssignedToUserName { get { return _AssignedToUserName; } set { _AssignedToUserName = value; EntityState.FieldChange("AssignedToUserName"); } }
        private string _AssignedToUserName;
        public static FieldInfo assignedToUserName = new FieldInfo("t_Assessment", "AssignedToUserName");

        //用户全名
        [Column]
        public string AssignedToUserFullName { get { return _AssignedToUserFullName; } set { _AssignedToUserFullName = value; EntityState.FieldChange("AssignedToUserFullName"); } }
        private string _AssignedToUserFullName;
        public static FieldInfo assignedToUserFullName = new FieldInfo("t_Assessment", "AssignedToUserFullName");

        //所属部门
        [Column]
        public string Department { get { return _Department; } set { _Department = value; EntityState.FieldChange("Department"); } }
        private string _Department;
        public static FieldInfo department = new FieldInfo("t_Assessment", "Department");

        //签名
        [Column]
        public string Signature { get { return _Signature; } set { _Signature = value; EntityState.FieldChange("Signature"); } }
        private string _Signature;
        public static FieldInfo signature = new FieldInfo("t_Assessment", "Signature");

        //意见
        [Column]
        public string Opinion { get { return _Opinion; } set { _Opinion = value; EntityState.FieldChange("Opinion"); } }
        private string _Opinion;
        public static FieldInfo opinion = new FieldInfo("t_Assessment", "Opinion");

        //意见 2
        [Column]
        public string Opinion2 { get { return _Opinion2; } set { _Opinion2 = value; EntityState.FieldChange("Opinion2"); } }
        private string _Opinion2;
        public static FieldInfo opinion2 = new FieldInfo("t_Assessment", "Opinion2");

        //意见(文字)
        [Column]
        public string OpinionText { get { return _OpinionText; } set { _OpinionText = value; EntityState.FieldChange("OpinionText"); } }
        private string _OpinionText;
        public static FieldInfo opinionText = new FieldInfo("t_Assessment", "OpinionText");

        //意见(文字)
        [Column]
        public string OpinionText2 { get { return _OpinionText2; } set { _OpinionText2 = value; EntityState.FieldChange("OpinionText2"); } }
        private string _OpinionText2;
        public static FieldInfo opinionText2 = new FieldInfo("t_Assessment", "OpinionText2");

        //备注
        [Column]
        public string Remark { get { return _Remark; } set { _Remark = value; EntityState.FieldChange("Remark"); } }
        private string _Remark;
        public static FieldInfo remark = new FieldInfo("t_Assessment", "Remark");
        
        [Column]
        public DateTime StartTime { get { return _StartTime; } set { _StartTime = value; EntityState.FieldChange("StartTime"); } }
        private DateTime _StartTime;
        public static FieldInfo startTime = new FieldInfo("t_Assessment", "StartTime");

        //日期
        [Column]
        [NowDate]
        public DateTime Time { get { return _Time; } set { _Time = value; EntityState.FieldChange("Time"); } }
        private DateTime _Time;
        public static FieldInfo time = new FieldInfo("t_Assessment", "Time");

        //退回步骤
        [Column]
        public string ReturnTo { get { return _ReturnTo; } set { _ReturnTo = value; EntityState.FieldChange("ReturnTo"); } }
        private string _ReturnTo;
        public static FieldInfo returnTo = new FieldInfo("t_Assessment", "ReturnTo");

        //状态
        [Column]
        public int Status { get { return _Status; } set { _Status = value; EntityState.FieldChange("Status"); } }
        private int _Status;
        public static FieldInfo status = new FieldInfo("t_Assessment", "Status");

        /// <summary>
        /// 业务流程名称
        /// </summary>
        [Column]
        public string BusinessProcess { get { return _BusinessProcess; } set { _BusinessProcess = value; EntityState.FieldChange("BusinessProcess"); } }
        private string _BusinessProcess;
        public static FieldInfo businessProcess = new FieldInfo("t_Assessment", "BusinessProcess");

        /// <summary>
        /// 业务流程唯一键
        /// </summary>
        [Column]
        public string BusinessKey { get { return _BusinessKey; } set { _BusinessKey = value; EntityState.FieldChange("BusinessKey"); } }
        private string _BusinessKey;
        public static FieldInfo businessKey = new FieldInfo("t_Assessment", "BusinessKey");
    }

    public partial class t_AssessmentOption
    {
        public string RadName { get; set; }
        public string RadValue { get; set; }
        public string Duty { get; set; }
        public bool IsDefault = false;

        public t_AssessmentOption(string RadName, string RadValue, bool IsDefault)
        {
            this.RadName = RadName;
            this.RadValue = RadValue;
            this.Duty = Duty;
            this.IsDefault = IsDefault;
        }

        public t_AssessmentOption(string RadName, string RadValue) 
        {
            this.RadName = RadName;
            this.RadValue = RadValue;
            this.IsDefault = false;
            this.Duty = Duty;
        }

        public t_AssessmentOption(String Duty) 
        {
            this.Duty = Duty;
        }
    }
}